<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
    <!-- 引入第三方样式 -->
    <link rel="stylesheet" href="/lib/fontawesome/css/font-awesome.css">
    <link rel="stylesheet" href="/lib/mui/css/mui.css">
    <!--引入初始化样式 -->
    <link rel="stylesheet" href="/css/common.css">
    <!-- 引入本地样式 -->
    <link rel="stylesheet" href="/css/index.css">
    <title>首页</title>
</head>

<body>
    <!-- 头部 -->
    <header class="pyg_headers">
        <div class="mui-input-row mui-search">
            <input type="search" class="mui-input-clear" placeholder="">
        </div>
    </header>

    <!-- 内容 -->
    <div class="pyg_view">
        <!-- 轮播图 -->
        <div class="pyg_slides">

        </div>
        <!-- 分类 -->
        <div class="pyg_cates">

        </div>

        <!-- 商品列表 -->
        <div class="pyg_list">
            <!-- 省钱图片 -->
        </div>
    </div>

    <!-- 尾部 -->
    <footer class="pyg_footer">
        <a href="/index.html">
            <span class="fa fa-home"></span>
            <div>首页</div>
        </a>
        <a href="/pages/category.html">
            <span class="fa fa-list-ul"></span>
            <div>分类</div>
        </a>
        <a href="javascript:;">
            <span class="fa fa-cart-plus "></span>
            <div>购物车</div>
        </a>
        <a href="/pages/login.html">
            <span class="fa fa-user"></span>
            <div>我的</div>
        </a>
    </footer>
</body>
<!-- 引入第三方js -->
<script src="/lib/arttemplate/template-web.js"></script>
<script src="/lib/zepto/zepto.js"></script>
<script src="/lib/mui/js/mui.js"></script>
<!-- 引入js初始化 -->
<script src="/js/common.js"></script>
<!-- 引入本地js样式 -->
<script src="/js/index.js"></script>

</html>


<!-- 模板 -->
<!-- 轮播图模板 -->
<script type="text/template" id="swiperTpl">
    <div class="mui-slider">
        <div class="mui-slider-group mui-slider-loop">
            <!--支持循环，需要重复图片节点-->
            <div class="mui-slider-item mui-slider-item-duplicate"><a href="javascript:;"><img src="{{data[data.length-1].image_src}}" /></a></div>
            {{each data  value index}}
                <div class="mui-slider-item"><a href="javascript:;"><img   src="{{value.image_src}}" /></a></div>
            {{/each}}
            <!--支持循环，需要重复图片节点-->
            <div class="mui-slider-item mui-slider-item-duplicate"><a href="javascript:;"><img src="{{data[0].image_src}}" /></a></div>
                    </div>
                       <!-- 索引器 -->
                       <div class="mui-slider-indicator">
                        {{each data  value index}}
                        {{if index==0}}
                   <div class="mui-indicator mui-active"></div>
                   {{/if}}
                   {{if index!=0}}
                   <div class="mui-indicator"></div>
                   {{/if}}
                   {{/each}}
                </div>
    </div>
</script>

<!-- 分类模板 -->
<script type="text/template" id="catesTpl">
    {{each data value index}}
    <a href="">
        <img src="{{value.image_src}}" alt="">
    </a>
    {{/each}}
</script>

<!-- 商品列表模板 -->
<script type="text/template" id="listTpl">
    <!-- 省钱图片 -->
    {{each data value1 index1}}
            <div class="goods_item">
                <img src="{{value1.group_img}}" alt="">
                <ul>
                    {{each value1.goods value2 index2}}
                    <li>
                        <a href="/pages/goods_detail.html?goods_id={{value2.goods_id}}" class="goods_detail">
                            <img src="{{value2.goods_small_logo}}" alt="">
                            <div class="goods_name">
                                    {{value2.goods_name}}
                            </div>
                            <div class="goods_price">
                                    {{value2.goods_price}}
                            </div>
                        </a>
                        <a href="/pages/goods_list.html?cid={{value2.cat_id}}" class="goods_like mui-btn mui-btn-primary mui-btn-outlined">
                                找相似
                           </a>
                    </li>
                    {{/each}}
                </ul>
            </div>
            {{/each}}
</script>